﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Dapper;
using Elight.Entity;
using Elight.Repository.Interfaces;

namespace Elight.Repository
{
    public partial class RoleAccessRepository : BaseRepository<Sys_Role_Access>, IRoleAccessRepository
    {
        public IEnumerable<Sys_Role_Access> GetList(params int[] roleIds)
        {
            using (IDbConnection conn = OpenSharedConnection())
            {
                string sql = @"SELECT * FROM SYS_ROLE_ACCESS t WHERE t.RoleId IN @RoleIds";
                return conn.Query<Sys_Role_Access>(sql, new { RoleIds = roleIds });
            }
        }
    }
}
